<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>模块列表</title>
<link rel="stylesheet" href="../../assets/js/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="../../assets/css/global.css" media="all">
<link rel="stylesheet" href="../../assets/js/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../assets/css/table.css" />
<style type="text/css">
.node-up {
	font-size: 75%;
	border-radius: .25em;
    background: #00CD00;
    padding: .1em .5em .2em;
    cursor:pointer;
    color: #fff
 }
 .node-down {
    font-size: 75%;
    border-radius: .25em;
    background: #e33;
    padding: .1em .5em .2em;
    cursor:pointer;
    color: #fff
 }
</style>
</head>

<body>
	<div class="admin-main">
		<blockquote class="layui-elem-quote">
			模块无需手动创建,新增模块会自动同注册中心同步。
		</blockquote>
		<fieldset class="layui-elem-field">
			<legend>模块列表</legend>
			<div class="layui-field-box layui-form">
				<table class="layui-hide" id="tablecont" lay-filter="table"></table>
			</div>
		</fieldset>
	</div>
	<script type="text/html" id="internalTpl">
      <input type="checkbox" data-id="{{d.id}}" value="{{d.internal}}" lay-skin="switch" lay-text="是|否" {{ d.internal ? 'checked' : '' }} disabled>            
    </script>
	<script type="text/html" id="enabledTpl">
      <input type="checkbox" data-id="{{d.id}}" value="{{d.enabled}}" lay-skin="switch" lay-text="是|否" {{ d.enabled ? 'checked' : '' }} disabled>          
    </script>
    <script type="text/html" id="nodesTpl">
    {{# layui.each(d.serviceInstances, function(index, item){ }}
       <span class="node-{{ item.status.toLowerCase() }}">{{ item.instanceId }}</span><br>
    {{# }); }}
    </script>     
	<script type="text/html" id="toolBar">
      <a class="layui-btn layui-btn-primary layui-btn-xs {{# if(d.id == 1){ }}layui-btn-disabled{{#  } }}" lay-event="switch">{{#  if(d.enabled){ }}禁用{{#  } else { }}启用{{#  } }} </a> 
      <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="apidoc">API文档</a>
      <a class="layui-btn layui-btn-xs" lay-event="edit {{# if(d.id == 1){ }}layui-btn-disabled{{#  } }}">编辑</a>
      <a class="layui-btn layui-btn-danger layui-btn-xs {{# if(d.id == 1){ }}layui-btn-disabled{{#  } }}" lay-event="del">删除</a>
    </script>
</body>
<script type="text/javascript" src="../../assets/js/layui/layui.js"></script>
<script>
	layui.cache.page = 'module';
	layui.config({
		version : "1.0.0",
		base : '../../assets/js/modules/'
	}).use('module');
</script>

</html>